package com.masterrabbit.sn.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName order_records
 */
@TableName(value ="order_records")
@Data
public class OrderRecords {
    /**
     * ID（自增）
     */
    @TableId(type = IdType.AUTO)
    private Integer recordId;

    /**
     * 订单编号（UUID）
     */
    private String orderNumber;

    /**
     * 服务分类
     */
    private String serviceCategory;

    /**
     * 服务门店
     */
    private String serviceShop;

    /**
     * 下单时间
     */
    private Date orderTime;

    /**
     * 预约时间
     */
    private Date appointmentTime;

    /**
     * 车辆
     */
    private String vehicleInfo;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 服务项目
     */
    private String serviceName;

    /**
     * 订单金额
     */
    private BigDecimal totalAmount;

    /**
     * 优惠金额
     */
    private BigDecimal discountAmount;

    /**
     * 实际金额
     */
    private BigDecimal actualAmount;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderRecords other = (OrderRecords) that;
        return (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId()))
            && (this.getOrderNumber() == null ? other.getOrderNumber() == null : this.getOrderNumber().equals(other.getOrderNumber()))
            && (this.getServiceCategory() == null ? other.getServiceCategory() == null : this.getServiceCategory().equals(other.getServiceCategory()))
            && (this.getServiceShop() == null ? other.getServiceShop() == null : this.getServiceShop().equals(other.getServiceShop()))
            && (this.getOrderTime() == null ? other.getOrderTime() == null : this.getOrderTime().equals(other.getOrderTime()))
            && (this.getAppointmentTime() == null ? other.getAppointmentTime() == null : this.getAppointmentTime().equals(other.getAppointmentTime()))
            && (this.getVehicleInfo() == null ? other.getVehicleInfo() == null : this.getVehicleInfo().equals(other.getVehicleInfo()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getServiceName() == null ? other.getServiceName() == null : this.getServiceName().equals(other.getServiceName()))
            && (this.getTotalAmount() == null ? other.getTotalAmount() == null : this.getTotalAmount().equals(other.getTotalAmount()))
            && (this.getDiscountAmount() == null ? other.getDiscountAmount() == null : this.getDiscountAmount().equals(other.getDiscountAmount()))
            && (this.getActualAmount() == null ? other.getActualAmount() == null : this.getActualAmount().equals(other.getActualAmount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode());
        result = prime * result + ((getOrderNumber() == null) ? 0 : getOrderNumber().hashCode());
        result = prime * result + ((getServiceCategory() == null) ? 0 : getServiceCategory().hashCode());
        result = prime * result + ((getServiceShop() == null) ? 0 : getServiceShop().hashCode());
        result = prime * result + ((getOrderTime() == null) ? 0 : getOrderTime().hashCode());
        result = prime * result + ((getAppointmentTime() == null) ? 0 : getAppointmentTime().hashCode());
        result = prime * result + ((getVehicleInfo() == null) ? 0 : getVehicleInfo().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getServiceName() == null) ? 0 : getServiceName().hashCode());
        result = prime * result + ((getTotalAmount() == null) ? 0 : getTotalAmount().hashCode());
        result = prime * result + ((getDiscountAmount() == null) ? 0 : getDiscountAmount().hashCode());
        result = prime * result + ((getActualAmount() == null) ? 0 : getActualAmount().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recordId=").append(recordId);
        sb.append(", orderNumber=").append(orderNumber);
        sb.append(", serviceCategory=").append(serviceCategory);
        sb.append(", serviceShop=").append(serviceShop);
        sb.append(", orderTime=").append(orderTime);
        sb.append(", appointmentTime=").append(appointmentTime);
        sb.append(", vehicleInfo=").append(vehicleInfo);
        sb.append(", remarks=").append(remarks);
        sb.append(", serviceName=").append(serviceName);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", discountAmount=").append(discountAmount);
        sb.append(", actualAmount=").append(actualAmount);
        sb.append("]");
        return sb.toString();
    }
}